﻿using Qy.Core;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Qy.Scenario;

[AppService]
public class AppLinkCateService : QyRepository<AppLinkCate>
{
    public AppLinkCateService(ApplicationContext applicationContext) :base(applicationContext)   {    }

    public async Task<bool> Delete(int id)
    {
        bool res = await Context.Queryable<AppLink>().AnyAsync(applink => applink.Cid == id);
        if (res)
            return await DeleteAndDelCacheAsync(id) > 0;
        return res;
    }
}
